I have a DragonRise Inc. USB Encoder and haven't had any issues mapping the buttons in Retropie 4.6 on a Raspberry Pi 4 4GB
the config is here ...
/opt/retropie/configs/all/retroarch/autoconfig/DragonRise Inc. Generic USB Joystick .cfg
and inside the .cfg is my button mapping
input_device = "DragonRise Inc. Generic USB Joystick "
input_driver = "udev"
input_enable_hotkey_btn = "6"
input_l_btn = "0"
input_load_state_btn = "0"
input_up_btn = "10"
input_left_btn = "11"
input_state_slot_decrease_btn = "11"
input_select_btn = "6"
input_right_btn = "9"
input_state_slot_increase_btn = "9"
input_r_btn = "5"
input_save_state_btn = "5"
input_y_btn = "4"
input_x_btn = "3"
input_menu_toggle_btn = "3"
input_down_btn = "8"
input_start_btn = "7"
input_exit_emulator_btn = "7"
input_b_btn = "1"
input_reset_btn = "1"
input_a_btn = "2"